//
//  PersonSignViewController.m
//  WBBaseProject
//
//  Created by xiaozhi on 2018/3/28.
//  Copyright © 2018年 吴斌. All rights reserved.
//

#import "PersonSignViewController.h"

@interface PersonSignViewController ()

@property(nonatomic, strong)UITextField *tf;

@end

@implementation PersonSignViewController

- (UITextField *)tf
{
    if (!_tf) {
        _tf = [[UITextField alloc]init];
        _tf.placeholder = @"用一句话介绍自己";
        _tf.backgroundColor = [UIColor whiteColor];
        _tf.font = WB_FontSize(15);
        
        UIView *v = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 10, 10)];
        _tf.leftView = v;
        _tf.leftViewMode = UITextFieldViewModeAlways;
        
        _tf.clearButtonMode = UITextFieldViewModeAlways;
    }
    return _tf;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"个人签名";
    self.view.backgroundColor = WB_RGBColor(240, 240, 240);
    [self addNavBtn];
    
    [self.view addSubview:self.tf];
    
    [self.tf becomeFirstResponder];
    [self.tf mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.top.equalTo(20);
        make.left.right.equalTo(0);
        make.height.equalTo(40);
    }];
}
- (void)addNavBtn{
    
    UIButton *right = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 40, 40)];
    right.titleLabel.font = WB_FontSize(15);
    [right setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [right setTitle:@"完成" forState:UIControlStateNormal];
    [right addTarget:self action:@selector(click) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *item = [[UIBarButtonItem alloc]initWithCustomView:right];
    self.navigationItem.rightBarButtonItem = item;
}
- (void)click
{
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
